#ifndef ELEMENTS_RULE_H
#define ELEMENTS_RULE_H

#include "common/more/json.h"

#include "element.h"

namespace Elements
{

struct Rule : public Element
{
    Rule() = default;
    Rule(const Rule& other);

    // -- Интерфейс элемента -- //

    virtual bool isSame(Element* other) const override;

    virtual Common::Json toJson() const override;
    virtual void fromJson(const Common::Json& json) override;

    virtual Element* clone() const override;
    virtual ElementType elementType() const override;

    // -- Интерфейс данных -- //

    unsigned roleId() const;
    void setRoleId(const unsigned value);

private:
    unsigned m_roleId;

};

typedef std::shared_ptr<Rule> RulePtr;
typedef std::vector<RulePtr> Rules;

} // namespace Elements

#endif // ELEMENTS_RULE_H
